#ifndef DOCUMENTDATE_H
#define DOCUMENTDATE_H
#include <QString>
#include <QSql>
#include <QSqlQuery>
#include <QList>

class DocumentDate
{
public:
    DocumentDate();
    ~DocumentDate();
    QString title;
    QString content;
    QString url;
    int id;

    static bool openSql();
    bool insertData();
    bool updateData();
    static bool isExistedData(QString url);
    static QList<DocumentDate> *loadDataFromDatabase();
    static QList<DocumentDate> getData(QString url);
    static QList<DocumentDate> getData(QString title,QString content);

private:
    static bool isInit;
};
#endif // DOCUMENTDATE_H
